package cn.edu.sdjzu.xg.eagle.Service;

import cn.edu.sdjzu.xg.eagle.dao.UserDaoImpl;
import cn.edu.sdjzu.xg.eagle.entity.User;
import cn.edu.sdjzu.xg.eagle.exception.BaseException;
import cn.edu.sdjzu.xg.eagle.util.JdbcHelper;

import java.sql.Connection;
import java.sql.SQLException;

public class UserService {

    private final UserDaoImpl userDao = UserDaoImpl.getInstance();

    public void login(User user) throws SQLException, BaseException {
        try (Connection connection = JdbcHelper.getConn();)
        {
            userDao.login(connection, user);
        }

    }
}
